import classNames from 'classnames'

export const DISPLAY_NAME_SUB_MENU = 'SubMenu'

export interface SubMenuProps {
  index?: string
  title: string
  className?: string
}

// 获取组件配置的class
export const getSubMenuClassNames = (
  props: SubMenuProps,
  extendClass?: () => Object
) => {
  const { className } = props
  return classNames(
    'menu-item sub-menu-item',
    className,
    extendClass && extendClass()
  )
}
